﻿<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.nobody.facepk.pojo.SessionUser"%>
<%@page import="com.nobody.facepk.model.Picture"%>
<%@page import="com.nobody.facepk.model.Friends"%>
<%@page import="com.nobody.facepk.model.Comment"%>
<%@page import="com.nobody.facepk.model.User"%>
<%@page import="com.nobody.facepk.service.UserService"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.List;"%>
<html>
  <head>
    <title>评论界面</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <%
  SessionUser user = (SessionUser)request.getSession().getAttribute("SESSION_USER");
  Picture pic = (Picture)request.getAttribute("picture");
  
  List list  = (List)request.getAttribute("comment");
  
  String picPath = pic.getPath();
  String picName = pic.getName();
  String realPath = "pictures/"+pic.getUserId()+"/"+picPath;
  %>
  <body>
   	评分界面<br/>
    <form action="commentOnPic.do" method="post">  
    <table>
    
   	<img src="<%=realPath %>" height="80" width="80"/><br/><br/>
   	
   	已发表的评论<br/>
    <%
    for(int i = 0 ; i < list.size(); i ++){
    Comment comment = (Comment)list.get(i);
    %>
   	Id<%=comment.getUserId() %>号用户发表了评论 :" <%=comment.getContent()%>"<br/>
    <%
    }
     %>
     
     <br/>
  	 填写你的评论:	<input type="text" size = "100" length="100" id="content" name="content" /><br/>
  	 <input type="hidden" value="<%=pic.getId()%>" size = "20" length="20" id="picId" name="picId" />
    <input type="submit" value="提交" />
    </table>
   
    </form>
  </body>
    
</html>
